/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.etop.dto;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 *
 * @author ccp <568093091@qq.com>
 */
public class BorrowDTO {

    private int goodsId;
    private String goodsName;
    private int isreturn;
    private Date re_time;
    private Date lend_time;
    private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

    public BorrowDTO(int goodsId, String goodsName, Date lend_time, Date re_time, int isreturn) {
        this.goodsId = goodsId;
        this.goodsName = goodsName;
        this.isreturn = isreturn;
        this.re_time = re_time;
        this.lend_time = lend_time;
    }

    public BorrowDTO() {
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public int getIsreturn() {
        return isreturn;
    }

    public void setIsreturn(int isreturn) {
        this.isreturn = isreturn;
    }

    public Date getRe_time() {
        return re_time;
    }

    public String getRe_times() {
        if(re_time==null){
            return null;
        }
        else{
            return sdf.format(re_time);
        }
        
    }

    public int getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(int goodsId) {
        this.goodsId = goodsId;
    }

    public void setRe_time(Date re_time) {
        this.re_time = re_time;
    }

    public Date getLend_time() {
        return lend_time;
    }

    public String getLend_times() {
        return sdf.format(lend_time);
    }

    public void setLend_time(Date lend_time) {
        this.lend_time = lend_time;
    }

    @Override
    public String toString() {
        return "BorrowDTO{" + "goodsName=" + goodsName + ", isreturn=" + isreturn + ", re_time=" + re_time + ", lend_time=" + lend_time + '}';
    }
}
